package utils;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class ReadText {

    public static List readF1(String filePath) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(
                new FileInputStream(filePath)));
        List list=new ArrayList();
        for (String line = br.readLine(); line != null; line = br.readLine()) {
           list.add(line);
        }

        br.close();
 return  list;
    }

    public static void main(String[] args) throws IOException {
        List list=readF1("D:\\test\\Array.txt");
        list.forEach(e-> System.out.println(e.toString()));
    }

}
